import Nofound from '.././views/tenant/Nofound.vue'
import AuthLogin from '.././views/tenant/AuthLogin.vue'
import Login from '.././views/tenant/Login.vue'
import Iframe from '.././views/tenant/Iframe.vue'
import Main from '.././views/tenant/Main.vue'
import OrderPdd from '.././views/tenant/qingshanerp/OrderPdd.vue'
import ShopList from '.././views/tenant/qingshanerp/ShopList.vue'
import Logistics from '.././views/tenant/qingshanerp/Logistics.vue'
import Good from '.././views/tenant/qingshanerp/Good.vue'
import Info from '.././views/tenant/Info.vue'
import Pwd from '.././views/tenant/Pwd.vue'

const tenant_routers = [
    // 登录
    {
        path: '/',
        name: 'login',
        component: Login,
        meta: { requiresAuth: false }
    },
    {
        path: '/auth/login',
        name: 'auth-login',
        component: AuthLogin,
        meta: { requiresAuth: false }
    },
    // 内容的模板
    {
        path: '/',
        component: Iframe,
        meta: { requiresAuth: true },
        children: [
            {
                path: 'torder/pddlist',
                name: 'torder-pddlist',
                meta: { requiresAuth: true },
                component: OrderPdd
            },
            {
                path: 'tgood/list',
                name: 'tgood-list',
                meta: { requiresAuth: true },
                component: Good
            },
            {
                path: 'tlogistics/list',
                name: 'tlogistics-list',
                meta: { requiresAuth: true },
                component: Logistics
            },
            {
                path: 'tshop/list',
                name: 'tshop-list',
                meta: { requiresAuth: true },
                component: ShopList
            },
            {
                path: 'tinfo/edit',
                name: 'tinfo-edit',
                meta: { requiresAuth: true },
                component: Info
            },
            {
                path: 'tinfo/pwd',
                name: 'tinfo-pwd',
                meta: { requiresAuth: true },
                component: Pwd
            },
            // 首页
            {
                path: 'index/index',
                name: 'index-index',
                meta: { requiresAuth: true },
                component: Main
            },
            // 其它404
            {
                path: '*',
                name: 'noaccess',
                meta: { requiresAuth: true },
                component: Nofound
            },
        ]
    },
    // 其它404
    {
        path: '*',
        name: 'noaccess',
        meta: { requiresAuth: false },
        component: Nofound
    }
]

export default tenant_routers